package com.kuai.door.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.kuai.blog.service.ISectionService;
import com.kuai.common.result.entity.Result;

import lombok.extern.slf4j.Slf4j;

@RestController
@RequestMapping("api/door/section")
@Slf4j
public class SectionControlller {
	
	@Autowired
	private ISectionService sectionService;
	
	
	@PostMapping("v1/all")
	public Result all() {
		log.info("获取版块");
		try {
			Map<String, Object> params = new HashMap<String, Object>();
			return sectionService.allSection(params);
		} catch (Exception e) {
			e.printStackTrace();
			return Result.error(e.getMessage());
		}
	}
	
}
